home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1997 November & December / Amiga-CD 1997 #11-12.iso / pd-disketten / ungepackt / 1_96s / apd-1-96s-5 / hdinstall < prev    next >
Text File  |  1996-01-25  |  9KB  |  392 lines

  1. ;;
  2. ;;  $Final Writer Demo Hard Drive Installation Script German Version $
  3. ;;  $Date: 1995/11/03 16:27:08 $
  4. ;;  $Revision: 1.3 $
  5. ;;
  6. ;;  Deutsche Uebersetzung: Helmut Eisenkolb
  7.  
  8. (set is_update 0)
  9. (set @user-level 1)    ; force to use average mode
  10. (complete 0)
  11.  
  12.  
  13. ;
  14. ; Installation Disk Names
  15. ;
  16. (set #install_disk_1 "AMIGA-Magazin-PD")
  17.  
  18. ;
  19. ; File/drawer names that change with different language versions.
  20. ;
  21. (set #fw_drawer        "FinalWriter_Demo_D")
  22.  
  23. ;
  24. ; LHex file
  25. ;
  26. (set #lhex_program
  27. (cat    #install_disk_1
  28.         ":lhex"
  29. ))
  30.  
  31. ; -------------------------------------------------------------------
  32. ; TEXT TRANSLATION SHOULD BEGIN HERE - Translate everything in quotes.
  33. ;
  34.  
  35. (set #which_drawer_prompt
  36. (cat    "In welchem Laufwerk oder Unterverzeichnis soll das Verzeichnis für die Final Writer Demo"
  37.         " erstellt werden?"
  38. ))
  39.  
  40. (set #which_drawer_help
  41. (cat    "Das Installationsprogramm wird ein Verzeichnis namens \""
  42.         #fw_drawer
  43.         "\" in der ausgewählten Disk bzw. Verzeichnis erstellen. Alle \"Final Writer\" "
  44.         "Dateien werden in dieses neue Verzeichnis kopiert.\n\n"
  45.         @askdir-help
  46. ))
  47.  
  48. (set #disk_space_prompt
  49. (cat    "Es ist vermutlich nicht genug Platz für die Installation von \""
  50.         #fw_drawer
  51.         "\" auf diesem Laufwerk. Wollen Sie trotzdem fortfahren?"
  52. ))
  53.  
  54. (set #disk_space_help
  55. (cat    #fw_drawer
  56.         " benötigt ungefähr 2.5 Megabyte für eine komplette Installation. "
  57.         "Falls die Final Writer Demo in dem Verzeichnis bereits installiert ist, "
  58.         "können Sie fortfahren. Andernfalls bitte ABORT oder NO auswählen und "
  59.         "entweder Platz auf dieser Partition schaffen, oder eine andere Partition "
  60.         "für die Installation auswählen."
  61. ))
  62.  
  63. (set #disk_space_abort
  64. (cat    #fw_drawer
  65.         " Installation abgebrochen, nicht genug Speicherplatz auf dieser Partition. \""
  66. ))
  67.  
  68. (set #update_options_prompt
  69. (cat    "Welche Teile möchten Sie updaten?"
  70. ))
  71.  
  72. (set #update_choice_0 "Final Writer Demo Programm")
  73. (set #update_choice_1 "System-Dateien")
  74. (set #update_choice_2 "System-Libraries")
  75. (set #update_choice_3 "System-Schriftarten")
  76.  
  77. (set #ask_disk_prompt
  78. (cat    "\n\nBitte \"%s\" in ein beliebiges Laufwerk einlegen."
  79. ))
  80.  
  81. (set #ask_disk1_help
  82. (cat    "\"%s\" enthält das Final Writer Programm, Libraries, System-Schriftarten, und Daten, die installiert werden.\n\n"
  83.         @askdisk-help
  84. ))
  85.  
  86.  
  87. (set #install_program        "Installiere Final Writer Programm von \"%s\".")
  88. (set #install_program_icon    "Installiere Final Writer Programm und Icon von \"%s\".")
  89. (set #install_datafiles        "Installiere Daten von \"%s\".")
  90. (set #install_libs            "Installiere Libraries von \"%s\".")
  91. (set #install_sysfonts        "Installiere System-Schriftarten von \"%s\".")
  92.  
  93. (set #install_program_err        "Fehler bei der Installation des Final Writer Programmes.")
  94. (set #install_datafiles_err    "Fehler bei der Installation der Daten.")
  95. (set #install_libs_err            "Fehler bei der Installation der Libraries.")
  96. (set #install_sysfonts_err        "Fehler bei der Installation der System-Schriftarten.")
  97.  
  98. (set #kickstart_err
  99. (cat    "Sie benötigen Workbench 2.04 oder höher um Final Writer zu installieren! "
  100.         "(Workbench Version 37.67 und Kickstart 37.175 oder höher.)"
  101. ))
  102.  
  103. ;
  104. ; TEXT TRANSLATION SHOULD END HERE - nothing below needs translation.
  105. ; -------------------------------------------------------------------
  106.  
  107. ;
  108. ; make sure we are running under V37 or higher...
  109. ;
  110. (if (< (/ (getversion) 65536) 37)
  111.     (
  112.     (abort    #kickstart_err)
  113.     )
  114. )
  115.  
  116. ;
  117. ; Ask where to install Final Writer.
  118. ;
  119. (set FW_dest
  120.     (askdir
  121.         (prompt    #which_drawer_prompt)
  122.         (help        #which_drawer_help @askdir-help)
  123.         (default @default-dest)
  124.     )
  125. )
  126.  
  127. ;
  128. ; Check if this is an update
  129. ; the FWLibs directory is a tell-tale sign
  130. ; that FW is already installed here
  131. ;
  132. (if (exists (tackon FW_dest "FWLibs"))
  133.     (set is_update 1)
  134.     (    (if (exists (tackon FW_dest #fw_drawer))
  135.             (set is_update 1)
  136.             (makedir (tackon FW_dest #fw_drawer) (infos))
  137.         )
  138.         (set FW_dest (tackon FW_dest #fw_drawer))
  139.     )
  140. )
  141.  
  142. (set @default-dest FW_dest)
  143. (set disk_space (getdiskspace FW_dest))
  144.  
  145.  
  146. ;
  147. ; If first time installation, install all
  148. ;
  149. (if (NOT is_update)
  150.     (
  151.         (set install_all 1)
  152.         (set disk_space_needed 2810183)    ; 2.68 Megs
  153.     )
  154. )
  155.  
  156.  
  157. ;
  158. ;Check if enough disk space is available.
  159. ;
  160. (if (AND (< disk_space disk_space_needed) (NOT is_update))
  161.     (
  162.         (set answer1
  163.             (askbool
  164.                 (prompt    #disk_space_prompt)
  165.                 (help        #disk_space_help)
  166.             )
  167.         )
  168.         (if (NOT answer1)
  169.             (abort #disk_space_abort
  170.                     (getdevice @default-dest)
  171.                     "\"."
  172.             )
  173.         )
  174.     )
  175. )
  176.  
  177.  
  178. ;
  179. ; Allow updating user to select what they want updated.
  180. ;
  181. (if is_update
  182.     (set install_options
  183.         (askoptions
  184.             (prompt #update_options_prompt)
  185.             (help @askoptions-help)
  186.             (choices
  187.                 #update_choice_0        ; Program
  188.                 #update_choice_1        ; System Data Files
  189.                 #update_choice_2        ; System Libraries
  190.                 #update_choice_3)        ; System Fonts
  191.             (default 15)                ; default to Program, Files, Libs, Fonts
  192.         )
  193.     )
  194.  
  195.     ; First time install
  196.     (if install_all
  197.         (set install_options 15)  ; hex F - all four options on
  198.     )
  199. )
  200.  
  201. ;
  202. ; Copy the extraction utility over and remember where it is
  203. ;
  204. (copyfiles
  205.     (source #lhex_program)
  206.     (dest FW_dest)
  207. )
  208. (set DeArcher (tackon FW_dest "lhex"))
  209. (set error 0)
  210.  
  211. ;
  212. ; Installing Files on Disk 1?
  213. ;
  214. (if (IN install_options 0 1 2)
  215.     (
  216.         ; Get Disk 1
  217.         (askdisk
  218.             (prompt    (#ask_disk_prompt #install_disk_1))
  219.             (help        (#ask_disk1_help #install_disk_1))
  220.             (dest        #install_disk_1)
  221.         )
  222.  
  223.         ;
  224.         ; If installing/updating the program
  225.         ;
  226.         (if (IN install_options 0)
  227.             (
  228.                 ; Make installer cd into FW_dest when it executes the run statement
  229.                 (set @execute-dir FW_dest)
  230.  
  231.                 ; copy the Final Writer program over if the program
  232.                 ; icon doesn't exists copy it over too.
  233.                 ( if (exists (tackon FW_dest "FinalWriter.info"))
  234.                     ; This DOES NOT copy the icon, in case the user
  235.                     ; has modified the tool-types
  236.                     (
  237.                         (working (#install_program #install_disk_1))
  238.                         (set error
  239.                             (run
  240.                                 ("\"%s\" -f x \"AMIGA-Magazin-PD:FinalWriter.lha\" FinalWriter >NIL:" DeArcher)
  241.                             )
  242.                         )
  243.                     )
  244.                     ; This DOES copy the icon
  245.                     (
  246.                         (working (#install_program_icon #install_disk_1))
  247.                         (set error
  248.                             (run
  249.                                 ("\"%s\" -f x \"AMIGA-Magazin-PD:FinalWriter.lha\" >NIL:" DeArcher)
  250.                             )
  251.                         )
  252.                     )
  253.                 )
  254.             )
  255.         )
  256.  
  257.         (if error
  258.             (abort #install_program_err)
  259.         )
  260.  
  261.         (complete 25)
  262.  
  263.         ; Installing FWFiles
  264.         (if (IN install_options 1)
  265.             (
  266.                 ; If FWFiles doesn't exist, create it.
  267.                 (if (NOT (exists (tackon FW_dest "FWFiles")))
  268.                     (
  269.                     (makedir (tackon FW_dest "FWFiles") (infos))
  270.                     )
  271.                 )
  272.  
  273.                 ; Make installer cd into FWFiles when it executes the run statement
  274.                 (set @execute-dir (tackon FW_dest "FWFiles"))
  275.  
  276.                 ; Extract the files
  277.                 (working (#install_datafiles #install_disk_1))
  278.                 (set error
  279.                     (run
  280.                         ("\"%s\" -f x \"AMIGA-Magazin-PD:FWFiles.lha\" >NIL:" DeArcher)
  281.                     )
  282.                 )
  283.  
  284.                 ; Abort if any errors
  285.                 (if error
  286.                     (abort #install_datafiles_err)
  287.                 )
  288.             )
  289.         )
  290.  
  291.         (complete 50)
  292.  
  293.         ; Installing FWLibs
  294.         (if (IN install_options 2)
  295.             (
  296.                 ; If FWLibs doesn't exist, create it.
  297.                 (if (NOT (exists (tackon FW_dest "FWLibs")))
  298.                     (
  299.                     (makedir (tackon FW_dest "FWLibs"))
  300.                     )
  301.                 )
  302.  
  303.                 ; Make installer cd into FWLibs when it executes the run statement
  304.                 (set @execute-dir (tackon FW_dest "FWLibs"))
  305.  
  306.                 (working (#install_libs #install_disk_1))
  307.                 (set error
  308.                     (run
  309.                         ("\"%s\" -f x \"AMIGA-Magazin-PD:FWLibs.lha\" >NIL:" DeArcher)
  310.                     )
  311.                 )
  312.  
  313.                 ; Abort if any errors
  314.                 (if error
  315.                     (abort #install_libs_err)
  316.                 )
  317.  
  318.                 (run ("Avail FLUSH"))
  319.             )
  320.         )
  321.     )
  322. )
  323.  
  324. (complete 75)
  325.  
  326. ; Installing System Fonts
  327. (if (IN install_options 3)
  328.     (
  329.         ; Get Disk 1
  330.         (askdisk
  331.             (prompt    (#ask_disk_prompt #install_disk_1))
  332.             (help        (#ask_disk1_help #install_disk_1))
  333.             (dest        #install_disk_1)
  334.         )
  335.  
  336.         ; Installing FWFonts
  337.         (if (IN install_options 3)
  338.             (
  339.                 ; If FWFonts doesn't exist, create it.
  340.                 (if (NOT (exists (tackon FW_dest "FWFonts")))
  341.                     (
  342.                     (makedir (tackon FW_dest "FWFonts") (infos))
  343.                     )
  344.                 )
  345.  
  346.                 ; Make installer cd into FWFonts when it executes the run statement
  347.                 (set @execute-dir (tackon FW_dest "FWFonts"))
  348.  
  349.                 (working (#install_sysfonts #install_disk_1))
  350.                 (set error
  351.                     (run
  352.                         ("\"%s\" -f x \"AMIGA-Magazin-PD:FWFonts.lha\" >NIL:" DeArcher)
  353.                     )
  354.                 )
  355.  
  356.                 ; Abort if any errors
  357.                 (if error
  358.                     (abort #install_sysfonts_err)
  359.                 )
  360.             )
  361.         )
  362.     )
  363. )
  364.  
  365. ; If FWDocs doesn't exist, create it.
  366. (if (NOT (exists (tackon FW_dest "FWDocs")))
  367.     (
  368.     (makedir (tackon FW_dest "FWDocs") (infos))
  369.     )
  370. )
  371.  
  372. ; If FWClipArt doesn't exist, create it.
  373. (if (NOT (exists (tackon FW_dest "FWClipArt")))
  374.     (
  375.     (makedir (tackon FW_dest "FWClipArt") (infos))
  376.     )
  377. )
  378.  
  379. ; If FWTextClips doesn't exist, create it.
  380. (if (NOT (exists (tackon FW_dest "FWTextClips")))
  381.     (
  382.     (makedir (tackon FW_dest "FWTextClips") (infos))
  383.     )
  384. )
  385.  
  386. (delete DeArcher)
  387.  
  388. (complete 100)
  389.  
  390. (exit)
  391.  
  392.